package com.example.springdemo.entity;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;


/**
 * cart对象 cart
 * 
 * @author ruoyi
 * @date 2025-04-23
 */
public class Cart extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 购物车编号 */
    private Long cartid;

    /** 商品编号 */

    private Long goodsid;

    private Goods goods;

    public Goods getGoods(){
        return goods;
    }

    public void setGoods(Goods goods){
        this.goods = goods;
    }


    /** 用户编号 */

    private Long userid;

    /** 商品数量 */

    private Long quantity;

    /** 商品价格 */

    private Long price;

    /** 提交 */

    private Long issubmit;

    /** 创建日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createDate;

    /** 更新日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date updateDate;

    public void setCartid(Long cartid) 
    {
        this.cartid = cartid;
    }

    public Long getCartid() 
    {
        return cartid;
    }
    public void setGoodsid(Long goodsid) 
    {
        this.goodsid = goodsid;
    }

    public Long getGoodsid() 
    {
        return goodsid;
    }
    public void setUserid(Long userid) 
    {
        this.userid = userid;
    }

    public Long getUserid() 
    {
        return userid;
    }
    public void setQuantity(Long quantity) 
    {
        this.quantity = quantity;
    }

    public Long getQuantity() 
    {
        return quantity;
    }
    public void setPrice(Long price) 
    {
        this.price = price;
    }

    public Long getPrice() 
    {
        return price;
    }
    public void setIssubmit(Long issubmit) 
    {
        this.issubmit = issubmit;
    }

    public Long getIssubmit() 
    {
        return issubmit;
    }
    public void setCreateDate(Date createDate)
    {
        this.createDate = createDate;
    }

    public Date getCreateDate()
    {
        return createDate;
    }
    public void setUpdateDate(Date updateDate) 
    {
        this.updateDate = updateDate;
    }

    public Date getUpdateDate() 
    {
        return updateDate;
    }

//    @Override
//    public String toString() {
//        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
//            .append("cartid", getCartid())
//            .append("goodsid", getGoodsid())
//            .append("userid", getUserid())
//            .append("quantity", getQuantity())
//            .append("price", getPrice())
//            .append("issubmit", getIssubmit())
//            .append("createDate", getCreateDate())
//            .append("updateDate", getUpdateDate())
//            .toString();
//    }
}
